<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/2/20
 * Time: 19:36
 */

namespace app\server;
use rap\db\DB;

class hightPec {
    public function addHighPecInfo ($data) {

        $res = DB::insert('mp_high_pec_log', $data);

        return $res;
    }

    public function getUserCheckCount() {

        $count = DB::select('mp_high_pec_log')->where()->fields()->cache()->count();

        return $count;
    }

    public function getUserCheckList ($where, $field, $page = 1, $limit = 20) {

        $data = DB::select('mp_high_pec_log')->where($where)->fields($field)->cache()->page($page, $limit)->findAll();

        return $data;
    }

    public function getUserCurrentLog($where, $field) {

        $data = DB::select('mp_high_pec_log')->where($where)->fields($field)->cache()->find();

        return $data;
    }
}